//package com.xiaode.controller.admin.authority;
//
//import com.jfinal.aop.Inject;
//import com.jfinal.core.Controller;
//import com.jfinal.core.Path;
//import com.jfinal.ext.cors.EnableCORS;
//import com.jfinal.kit.Ret;
//import com.xiaode.common.anotation.Authority;
//import com.xiaode.common.anotation.BooleanV;
//import com.xiaode.common.anotation.JSONArrayString;
//import com.xiaode.util.apidoc.annotation.Api;
//import com.xiaode.util.apidoc.annotation.ApiOper;
//import com.xiaode.util.apidoc.annotation.ApiPara;
//
//import javax.validation.constraints.NotBlank;
//import javax.validation.constraints.NotEmpty;
//import javax.validation.constraints.Size;
//
//@Path("/newAuthority")
//@Api("权限配置相关服务")
//@EnableCORS
//public class NewAuthorityController extends Controller {
//    @Inject
//    NewAuthorityService service;
//
//    @ApiOper("查询架构")
//    @Authority(description = "查询架构", permission = "admin:newAuthority:findOrganization", permissionParentName = "管理员模块", permissionName = "架构管理", type = 1)
//    public void findOrganization()throws Exception{
//        Ret ret = service.findOrganization();
//        renderJson(ret);
//    }
//
//    /**
//     * 修改节点
//     */
//    @ApiOper("修改节点")
//    @Authority(description = "修改节点", permission = "admin:newAuthority:updateNode", permissionParentName = "管理员模块", permissionName = "架构管理", type = 2)
//    public void updateNode(
//		@NotEmpty @ApiPara(value = "nodeId",notes = "节点Id")Integer nodeId,
//        @NotBlank @ApiPara(value = "name",notes = "新的描述")String name,
//        @JSONArrayString @ApiPara(value = "adIdList",notes = "Id列表")String adIdList,
//        @BooleanV @ApiPara(value = "createChatGroup",notes = "是否创建群聊")Boolean createChatGroup,
//        @ApiPara(value = "chatGroupName",notes = "群聊名称")String chatGroupName)throws Exception{
//        Ret ret = service.updateNode(nodeId,name,adIdList,createChatGroup,chatGroupName);
//        renderJson(ret);
//    }
//
//
//    /**
//     * 成员管理
//     */
//    @ApiOper("节点成员管理")
//    @Authority(description = "节点成员管理", permission = "admin:newAuthority:nodeMemberManage", permissionParentName = "管理员模块", permissionName = "架构管理", type = 2)
//    public void nodeMemberManage(@NotEmpty @ApiPara(value = "nodeId",notes = "节点Id")Integer nodeId,
//                                 @JSONArrayString @ApiPara(value = "stuIdList",notes = "学生Id列表")String stuIdList,
//                                 @JSONArrayString @ApiPara(value = "adIdList",notes = "Id列表")String adIdList)throws Exception{
//        Ret ret = service.nodeMemberManage(nodeId,adIdList,stuIdList);
//        renderJson(ret);
//    }
//
//    /**
//     * 删除节点
//     */
//    @ApiOper("删除节点")
//    @Authority(description = "删除节点", permission = "admin:newAuthority:delNode", permissionParentName = "管理员模块", permissionName = "架构管理", type = 2)
//    public void delNode(@NotEmpty @ApiPara(value = "nodeId",notes = "节点Id")Integer nodeId)throws Exception{
//        Ret ret = service.delNode(nodeId);
//        renderJson(ret);
//    }
//
//    /**
//     * 添加节点
//     */
//    @ApiOper("添加节点")
//    @Authority(description = "添加节点", permission = "admin:newAuthority:addNode", permissionParentName = "管理员模块", permissionName = "架构管理", type = 2)
//    public void addNode(@NotEmpty @ApiPara(value = "name", notes = "节点名称") String name,
//                        @ApiPara(value = "parentNodeId", notes = "父节点Id") Integer parentNodeId,
//                        @JSONArrayString @ApiPara(value = "adIdList",notes = "Id列表")String adIdList,
//                        @BooleanV @ApiPara(value = "createChatGroup",notes = "是否创建群聊")Boolean createChatGroup,
//                        @ApiPara(value = "chatName",notes = "群聊名称")String chatName) throws Exception {
//        Ret ret = service.addNode(name, parentNodeId,adIdList,createChatGroup,chatName);
//        renderJson(ret);
//    }
//
//    /**
//     * 根据节点Id查询成员
//     */
//    @ApiOper("根据节点Id查询成员")
//    @Authority(description = "根据节点Id查询成员", permission = "admin:newAuthority:findNodeMember", permissionParentName = "管理员模块", permissionName = "架构管理", type = 1)
//    public void findNodeMember(@NotEmpty @ApiPara(value = "nodeId",notes = "节点Id")Integer nodeId,
//                               @ApiPara(value = "keyWord",notes = "关键字")String keyWord,
//                               @Size @ApiPara(value = "page",notes = "当前页")Integer page,
//                               @Size @ApiPara(value = "limit",notes = "每页大小")Integer limit) throws Exception {
//        Ret ret = service.findNodeMember(nodeId,keyWord,page,limit);
//        renderJson(ret);
//    }
//
//    /**
//     * 删除
//     */
//    @ApiOper("删除用户")
//    @Authority(description = "根据节点Id查询成员", permission = "admin:newAuthority:delMember", permissionParentName = "管理员模块", permissionName = "架构管理", type = 2)
//    public void delMember(@Size @ApiPara(value = "userId",notes = "用户id")Integer userId,
//                          @Size @ApiPara(value = "userType",notes = "用户类型")Integer userType) throws Exception {
//        Ret ret = service.delMember(userId,userType);
//        renderJson(ret);
//    }
//
//}
